A vietnamese VIQR-based input method.
authorRobert Brady <robert@suse.co.uk>
Sun, 12 Nov 2000 22:59:39 +0000 (22:59 +0000)
committerRobert Brady <rbrady@src.gnome.org>
Sun, 12 Nov 2000 22:59:39 +0000 (22:59 +0000)
Sun Nov 12 22:52:51 2000  Robert Brady  <robert@suse.co.uk>

   * modules/input/imviqr.c: A vietnamese VIQR-based input method.

   * modules/input/imthai-broken.c: A Thai input method for use if
   Thai keys are really generating Latin1 keysyms.

   * modules/input/Makefile.am: Build these.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
modules/input/Makefile.am
modules/input/imthai-broken.c [new file with mode: 0644]
modules/input/imviqr.c [new file with mode: 0644]

index 6c240badc0d5764294c5cb1c1dabc98a58738a32..28ed84f9573d2149b1d04e7e427252f714b18422 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Sun Nov 12 22:52:51 2000  Robert Brady  <robert@suse.co.uk>
+
+       * modules/input/imviqr.c: A vietnamese VIQR-based input method.
+
+       * modules/input/imthai-broken.c: A Thai input method for use if
+       Thai keys are really generating Latin1 keysyms.
+
+       * modules/input/Makefile.am: Build these.
+
 Sun Nov 12 22:15:35 2000  Robert Brady  <robert@suse.co.uk>
 
        * gtk/gtkfileselection.c, gdk/win32/gdkfont-win32.c: 
index 6c240badc0d5764294c5cb1c1dabc98a58738a32..28ed84f9573d2149b1d04e7e427252f714b18422 100644 (file)
@@ -1,3 +1,12 @@
+Sun Nov 12 22:52:51 2000  Robert Brady  <robert@suse.co.uk>
+
+       * modules/input/imviqr.c: A vietnamese VIQR-based input method.
+
+       * modules/input/imthai-broken.c: A Thai input method for use if
+       Thai keys are really generating Latin1 keysyms.
+
+       * modules/input/Makefile.am: Build these.
+
 Sun Nov 12 22:15:35 2000  Robert Brady  <robert@suse.co.uk>
 
        * gtk/gtkfileselection.c, gdk/win32/gdkfont-win32.c: 
index 6c240badc0d5764294c5cb1c1dabc98a58738a32..28ed84f9573d2149b1d04e7e427252f714b18422 100644 (file)
@@ -1,3 +1,12 @@
+Sun Nov 12 22:52:51 2000  Robert Brady  <robert@suse.co.uk>
+
+       * modules/input/imviqr.c: A vietnamese VIQR-based input method.
+
+       * modules/input/imthai-broken.c: A Thai input method for use if
+       Thai keys are really generating Latin1 keysyms.
+
+       * modules/input/Makefile.am: Build these.
+
 Sun Nov 12 22:15:35 2000  Robert Brady  <robert@suse.co.uk>
 
        * gtk/gtkfileselection.c, gdk/win32/gdkfont-win32.c: 
index 6c240badc0d5764294c5cb1c1dabc98a58738a32..28ed84f9573d2149b1d04e7e427252f714b18422 100644 (file)
@@ -1,3 +1,12 @@
+Sun Nov 12 22:52:51 2000  Robert Brady  <robert@suse.co.uk>
+
+       * modules/input/imviqr.c: A vietnamese VIQR-based input method.
+
+       * modules/input/imthai-broken.c: A Thai input method for use if
+       Thai keys are really generating Latin1 keysyms.
+
+       * modules/input/Makefile.am: Build these.
+
 Sun Nov 12 22:15:35 2000  Robert Brady  <robert@suse.co.uk>
 
        * gtk/gtkfileselection.c, gdk/win32/gdkfont-win32.c: 
index 6c240badc0d5764294c5cb1c1dabc98a58738a32..28ed84f9573d2149b1d04e7e427252f714b18422 100644 (file)
@@ -1,3 +1,12 @@
+Sun Nov 12 22:52:51 2000  Robert Brady  <robert@suse.co.uk>
+
+       * modules/input/imviqr.c: A vietnamese VIQR-based input method.
+
+       * modules/input/imthai-broken.c: A Thai input method for use if
+       Thai keys are really generating Latin1 keysyms.
+
+       * modules/input/Makefile.am: Build these.
+
 Sun Nov 12 22:15:35 2000  Robert Brady  <robert@suse.co.uk>
 
        * gtk/gtkfileselection.c, gdk/win32/gdkfont-win32.c: 
index 6c240badc0d5764294c5cb1c1dabc98a58738a32..28ed84f9573d2149b1d04e7e427252f714b18422 100644 (file)
@@ -1,3 +1,12 @@
+Sun Nov 12 22:52:51 2000  Robert Brady  <robert@suse.co.uk>
+
+       * modules/input/imviqr.c: A vietnamese VIQR-based input method.
+
+       * modules/input/imthai-broken.c: A Thai input method for use if
+       Thai keys are really generating Latin1 keysyms.
+
+       * modules/input/Makefile.am: Build these.
+
 Sun Nov 12 22:15:35 2000  Robert Brady  <robert@suse.co.uk>
 
        * gtk/gtkfileselection.c, gdk/win32/gdkfont-win32.c: 
index 6c240badc0d5764294c5cb1c1dabc98a58738a32..28ed84f9573d2149b1d04e7e427252f714b18422 100644 (file)
@@ -1,3 +1,12 @@
+Sun Nov 12 22:52:51 2000  Robert Brady  <robert@suse.co.uk>
+
+       * modules/input/imviqr.c: A vietnamese VIQR-based input method.
+
+       * modules/input/imthai-broken.c: A Thai input method for use if
+       Thai keys are really generating Latin1 keysyms.
+
+       * modules/input/Makefile.am: Build these.
+
 Sun Nov 12 22:15:35 2000  Robert Brady  <robert@suse.co.uk>
 
        * gtk/gtkfileselection.c, gdk/win32/gdkfont-win32.c: 
index d3809cdbf9beb3c0a7e97342f3ec66cbd26ba859..e2785a3785ed619dc3294abc6a9d7727d8b0c48c 100644 (file)
@@ -32,11 +32,17 @@ LDADDS = @STRIP_BEGIN@                                      \
 @STRIP_END@
 
 moduledir = $(libdir)/gtk+/gtk-2.0/$(GTK_VERSION)/immodules
-module_LTLIBRARIES = im-cyrillic-translit.la im-xim.la
+module_LTLIBRARIES = im-cyrillic-translit.la im-xim.la im-viqr.la im-thai-broken.la
 
 im_cyrillic_translit_la_LDFLAGS = -rpath $(libdir) -export-dynamic -avoid-version -module
 im_cyrillic_translit_la_SOURCES = imcyrillic-translit.c
 
+im_thai_broken_la_LDFLAGS = -rpath $(libdir) -export-dynamic -avoid-version -module
+im_thai_broken_la_SOURCES = imthai-broken.c
+
+im_viqr_la_LDFLAGS = -rpath $(libdir) -export-dynamic -avoid-version -module
+im_viqr_la_SOURCES = imviqr.c
+
 im_xim_la_LDFLAGS = -rpath $(libdir) -export-dynamic -avoid-version -module
 im_xim_la_SOURCES = gtkimcontextxim.c imxim.c
 
diff --git a/modules/input/imthai-broken.c b/modules/input/imthai-broken.c
new file mode 100644 (file)
index 0000000..9974800
--- /dev/null
@@ -0,0 +1,213 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2000 Red Hat Software
+ * Copyright (C) 2000 SuSE Linux Ltd
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Original author: Owen Taylor <otaylor@redhat.com>
+ * 
+ * Modified for Thai (Broken) - Robert Brady <robert@suse.co.uk>
+ *
+ */
+
+#include <string.h>
+
+#include <gdk/gdkkeysyms.h>
+
+#include "gtk/gtkintl.h"
+#include "gtk/gtkimcontextsimple.h"
+#include "gtk/gtkimmodule.h"
+
+GType type_thai_broken = 0;
+
+static void thai_broken_class_init (GtkIMContextSimpleClass *class);
+static void thai_broken_init (GtkIMContextSimple *im_context);
+
+static void
+thai_broken_register_type (GTypeModule *module)
+{
+  static const GTypeInfo object_info =
+  {
+    sizeof (GtkIMContextSimpleClass),
+    (GBaseInitFunc) NULL,
+    (GBaseFinalizeFunc) NULL,
+    (GClassInitFunc) thai_broken_class_init,
+    NULL,           /* class_finalize */
+    NULL,           /* class_data */
+    sizeof (GtkIMContextSimple),
+    0,
+    (GtkObjectInitFunc) thai_broken_init,
+  };
+
+  type_thai_broken = 
+    g_type_module_register_type (module,
+                                GTK_TYPE_IM_CONTEXT_SIMPLE,
+                                "GtkIMContextThaiBroken",
+                                &object_info, 0);
+}
+
+static guint16 thai_broken_compose_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+  0xeb, 0, 0, 0, 0, 0x0e4b,
+  0xec, 0, 0, 0, 0, 0x0e4c,
+  0xed, 0, 0, 0, 0, 0x0e4d,
+  0xee, 0, 0, 0, 0, 0x0e4e,
+  0xef, 0, 0, 0, 0, 0x0e4f,
+  0xf0, 0, 0, 0, 0, 0x0e50,
+  0xf1, 0, 0, 0, 0, 0x0e51,
+  0xf2, 0, 0, 0, 0, 0x0e52,
+  0xf3, 0, 0, 0, 0, 0x0e53,
+  0xf4, 0, 0, 0, 0, 0x0e54,
+  0xf5, 0, 0, 0, 0, 0x0e55,
+  0xf6, 0, 0, 0, 0, 0x0e56,
+  0xf7, 0, 0, 0, 0, 0x0e57,
+  0xf8, 0, 0, 0, 0, 0x0e58,
+  0xf9, 0, 0, 0, 0, 0x0e59,
+  0xfa, 0, 0, 0, 0, 0x0e5a,
+  0xfb, 0, 0, 0, 0, 0x0e5b,
+  0xfc, 0, 0, 0, 0, 0x0e5c,
+  0xfd, 0, 0, 0, 0, 0x0e5d,
+  0xfe, 0, 0, 0, 0, 0x0e5e,
+  0xff, 0, 0, 0, 0, 0x0e5f,
+};
+
+static void
+thai_broken_class_init (GtkIMContextSimpleClass *class)
+{
+}
+
+static void
+thai_broken_init (GtkIMContextSimple *im_context)
+{
+  gtk_im_context_simple_add_table (im_context,
+                                  thai_broken_compose_seqs,
+                                  4,
+                                  G_N_ELEMENTS (thai_broken_compose_seqs) / (4 + 2));
+}
+
+static const GtkIMContextInfo thai_broken_info = { 
+  "thai_broken",          /* ID */
+  N_("Thai (Broken)"),     /* Human readable name */
+  "gtk+",                 /* Translation domain */
+   GTK_LOCALEDIR,         /* Dir for bindtextdomain (not strictly needed for "gtk+") */
+  ""                      /* Languages for which this module is the default */
+};
+
+static const GtkIMContextInfo *info_list[] = {
+  &thai_broken_info
+};
+
+void
+im_module_init (GTypeModule *module)
+{
+  thai_broken_register_type (module);
+}
+
+void 
+im_module_exit (void)
+{
+}
+
+void 
+im_module_list (const GtkIMContextInfo ***contexts,
+               int                      *n_contexts)
+{
+  *contexts = info_list;
+  *n_contexts = G_N_ELEMENTS (info_list);
+}
+
+GtkIMContext *
+im_module_create (const gchar *context_id)
+{
+  if (strcmp (context_id, "thai_broken") == 0)
+    return GTK_IM_CONTEXT (gtk_type_new (type_thai_broken));
+  else
+    return NULL;
+}
diff --git a/modules/input/imviqr.c b/modules/input/imviqr.c
new file mode 100644 (file)
index 0000000..8113df4
--- /dev/null
@@ -0,0 +1,279 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2000 Red Hat Software
+ * Copyright (C) 2000 SuSE Linux Ltd
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Original author: Owen Taylor <otaylor@redhat.com>
+ * 
+ * Modified for VIQR - Robert Brady <robert@suse.co.uk>
+ *
+ */
+
+#include <string.h>
+
+#include <gdk/gdkkeysyms.h>
+
+#include "gtk/gtkintl.h"
+#include "gtk/gtkimcontextsimple.h"
+#include "gtk/gtkimmodule.h"
+
+GType type_viqr_translit = 0;
+
+static void viqr_class_init (GtkIMContextSimpleClass *class);
+static void viqr_init (GtkIMContextSimple *im_context);
+
+static void
+viqr_register_type (GTypeModule *module)
+{
+  static const GTypeInfo object_info =
+  {
+    sizeof (GtkIMContextSimpleClass),
+    (GBaseInitFunc) NULL,
+    (GBaseFinalizeFunc) NULL,
+    (GClassInitFunc) viqr_class_init,
+    NULL,           /* class_finalize */
+    NULL,           /* class_data */
+    sizeof (GtkIMContextSimple),
+    0,
+    (GtkObjectInitFunc) viqr_init,
+  };
+
+  type_viqr_translit = 
+    g_type_module_register_type (module,
+                                GTK_TYPE_IM_CONTEXT_SIMPLE,
+                                "GtkIMContextViqr",
+                                &object_info, 0);
+}
+
+static guint16 viqr_compose_seqs[] = {
+  GDK_A,                   0,                0, 0, 0, 'A',
+  GDK_A,                   GDK_apostrophe,   0, 0, 0, 0xc1,
+  GDK_A,  GDK_parenleft,   0,                0, 0,    0x102,
+  GDK_A,  GDK_parenleft,   GDK_apostrophe,   0, 0,    0x1eae,
+  GDK_A,  GDK_parenleft,   GDK_period,       0, 0,    0x1eb6,
+  GDK_A,  GDK_parenleft,   GDK_question,     0, 0,    0x1eb2,
+  GDK_A,  GDK_parenleft,   GDK_grave,        0, 0,    0x1eb0,
+  GDK_A,  GDK_parenleft,   GDK_asciitilde,   0, 0,    0x1eb4,
+  GDK_A,                   GDK_period,       0, 0, 0, 0x1ea0,
+  GDK_A,                   GDK_question,     0, 0, 0, 0x1ea2,
+  GDK_A,  GDK_asciicircum, 0,                0, 0,    0xc2,
+  GDK_A,  GDK_asciicircum, GDK_apostrophe,   0, 0,    0x1ea4,
+  GDK_A,  GDK_asciicircum, GDK_period,       0, 0,    0x1eac,
+  GDK_A,  GDK_asciicircum, GDK_question,     0, 0,    0x1ea8,
+  GDK_A,  GDK_asciicircum, GDK_grave,        0, 0,    0x1ea6,
+  GDK_A,  GDK_asciicircum, GDK_asciitilde,   0, 0,    0x1eaa,
+  GDK_A,                   GDK_grave,        0, 0, 0, 0xc0,
+  GDK_A,                   GDK_asciitilde,   0, 0, 0, 0xc3,
+  GDK_D,                   0,                0, 0, 0, 'D',
+  GDK_D,                   GDK_D,            0, 0, 0, 0x110,
+  GDK_D,                   GDK_d,            0, 0, 0, 0x110,
+  GDK_E,                   0,                0, 0, 0, 'E',
+  GDK_E,                   GDK_apostrophe,   0, 0, 0, 0xc9,
+  GDK_E,                   GDK_period,       0, 0, 0, 0x1eb8,
+  GDK_E,                   GDK_question,     0, 0, 0, 0x1eba,
+  GDK_E,  GDK_asciicircum, 0,                0, 0,    0xca,
+  GDK_E,  GDK_asciicircum, GDK_apostrophe,   0, 0,    0x1ebe,
+  GDK_E,  GDK_asciicircum, GDK_period,       0, 0,    0x1ec6,
+  GDK_E,  GDK_asciicircum, GDK_question,     0, 0,    0x1ec2,
+  GDK_E,  GDK_asciicircum, GDK_grave,        0, 0,    0x1ec0,
+  GDK_E,  GDK_asciicircum, GDK_asciitilde,   0, 0,    0x1ec4,
+  GDK_E,                   GDK_grave,        0, 0, 0, 0xc8,
+  GDK_E,                   GDK_asciitilde,   0, 0, 0, 0x1ebc,
+  GDK_I,                   0,                0, 0, 0, 'I',
+  GDK_I,                   GDK_apostrophe,   0, 0, 0, 0xcd,
+  GDK_I,                   GDK_period,       0, 0, 0, 0x1eca,
+  GDK_I,                   GDK_question,     0, 0, 0, 0x1ec8,
+  GDK_I,                   GDK_grave,        0, 0, 0, 0xcc,
+  GDK_I,                   GDK_asciitilde,   0, 0, 0, 0x128,
+  GDK_O,                   0,                0, 0, 0, 'O',
+  GDK_O,                   GDK_apostrophe,   0, 0, 0, 0xD3,
+  GDK_O,  GDK_plus,        0,                0, 0,    0x1a0,
+  GDK_O,  GDK_plus,        GDK_apostrophe,   0, 0,    0x1eda,
+  GDK_O,  GDK_plus,        GDK_period,       0, 0,    0x1ee2,
+  GDK_O,  GDK_plus,        GDK_question,     0, 0,    0x1ede,
+  GDK_O,  GDK_plus,        GDK_grave,        0, 0,    0x1edc,
+  GDK_O,  GDK_plus,        GDK_asciitilde,   0, 0,    0x1ee0,
+  GDK_O,                   GDK_period,       0, 0, 0, 0x1ecc,
+  GDK_O,                   GDK_question,     0, 0, 0, 0x1ece,
+  GDK_O,  GDK_asciicircum, 0,                0, 0,    0xd4,
+  GDK_O,  GDK_asciicircum, GDK_apostrophe,   0, 0,    0x1ed0,
+  GDK_O,  GDK_asciicircum, GDK_period,       0, 0,    0x1ed8,
+  GDK_O,  GDK_asciicircum, GDK_question,     0, 0,    0x1ed4,
+  GDK_O,  GDK_asciicircum, GDK_grave,        0, 0,    0x1ed2,
+  GDK_O,  GDK_asciicircum, GDK_asciitilde,   0, 0,    0x1ed6,
+  GDK_O,                   GDK_grave,        0, 0, 0, 0xD2,
+  GDK_O,                   GDK_asciitilde,   0, 0, 0, 0xD5,
+  GDK_U,                   0,                0, 0, 0, 'U',
+  GDK_U,                   GDK_apostrophe,   0, 0, 0, 0xDA,
+  GDK_U,  GDK_plus,        0,                0, 0,    0x1af,
+  GDK_U,  GDK_plus,        GDK_apostrophe,   0, 0,    0x1ee8,
+  GDK_U,  GDK_plus,        GDK_period,       0, 0,    0x1ef0,
+  GDK_U,  GDK_plus,        GDK_question,     0, 0,    0x1eec,
+  GDK_U,  GDK_plus,        GDK_grave,        0, 0,    0x1eea,
+  GDK_U,  GDK_plus,        GDK_asciitilde,   0, 0,    0x1eee,
+  GDK_U,                   GDK_period,       0, 0, 0, 0x1ee4,
+  GDK_U,                   GDK_question,     0, 0, 0, 0x1ee6,
+  GDK_U,                   GDK_grave,        0, 0, 0, 0xd9,
+  GDK_U,                   GDK_asciitilde,   0, 0, 0, 0x168,
+  GDK_Y,                   0,                0, 0, 0, 'Y',
+  GDK_Y,                   GDK_apostrophe,   0, 0, 0, 0xdd,
+  GDK_Y,                   GDK_period,       0, 0, 0, 0x1ef4,
+  GDK_Y,                   GDK_question,     0, 0, 0, 0x1ef6,
+  GDK_Y,                   GDK_grave,        0, 0, 0, 0x1ef2,
+  GDK_Y,                   GDK_asciitilde,   0, 0, 0, 0x1ef8,
+  /* Do we need anything else here? */
+  GDK_backslash,           0,                0, 0, 0, 0,
+  GDK_backslash,           GDK_apostrophe,   0, 0, 0, '\'',
+  GDK_backslash,           GDK_parenleft,    0, 0, 0, '(',
+  GDK_backslash,           GDK_plus,         0, 0, 0, '+',
+  GDK_backslash,           GDK_period,       0, 0, 0, '.',
+  GDK_backslash,           GDK_question,     0, 0, 0, '?',
+  GDK_backslash,           GDK_D,            0, 0, 0, 'D',
+  GDK_backslash,           GDK_backslash,    0, 0, 0, '\\',
+  GDK_backslash,           GDK_asciicircum,  0, 0, 0, '^',
+  GDK_backslash,           GDK_grave,        0, 0, 0, '`',
+  GDK_backslash,           GDK_d,            0, 0, 0, 'd',
+  GDK_backslash,           GDK_asciitilde,   0, 0, 0, '~',
+  GDK_a,                   0,                0, 0, 0, 'a',
+  GDK_a,                   GDK_apostrophe,   0, 0, 0, 0xe1,
+  GDK_a, GDK_parenleft,    0,                0, 0,    0x103,
+  GDK_a, GDK_parenleft,    GDK_apostrophe,   0, 0,    0x1eaf,
+  GDK_a, GDK_parenleft,    GDK_period,       0, 0,    0x1eb7,
+  GDK_a, GDK_parenleft,    GDK_question,     0, 0,    0x1eb3,
+  GDK_a, GDK_parenleft,    GDK_grave,        0, 0,    0x1eb1,
+  GDK_a, GDK_parenleft,    GDK_asciitilde,   0, 0,    0x1eb5,
+  GDK_a,                   GDK_period,       0, 0, 0, 0x1ea1,
+  GDK_a,                   GDK_question,     0, 0, 0, 0x1ea3,
+  GDK_a, GDK_asciicircum,  0,                0, 0,    0xe2,
+  GDK_a, GDK_asciicircum,  GDK_apostrophe,   0, 0,    0x1ea5,
+  GDK_a, GDK_asciicircum,  GDK_period,       0, 0,    0x1ead,
+  GDK_a, GDK_asciicircum,  GDK_question,     0, 0,    0x1ea9,
+  GDK_a, GDK_asciicircum,  GDK_grave,        0, 0,    0x1ea7,
+  GDK_a, GDK_asciicircum,  GDK_asciitilde,   0, 0,    0x1eab,
+  GDK_a,                   GDK_grave,        0, 0, 0, 0xe0,
+  GDK_a,                   GDK_asciitilde,   0, 0, 0, 0xe3,
+  GDK_d,                   0,                0, 0, 0, 'd',
+  GDK_d,                   GDK_d,            0, 0, 0, 0x111,
+  GDK_e,                   0,                0, 0, 0, 'e',
+  GDK_e,                   GDK_apostrophe,   0, 0, 0, 0xe9,
+  GDK_e,                   GDK_period,       0, 0, 0, 0x1eb9,
+  GDK_e,                   GDK_question,     0, 0, 0, 0x1ebb,
+  GDK_e, GDK_asciicircum,  0,                0, 0,    0xea,
+  GDK_e, GDK_asciicircum,  GDK_apostrophe,   0, 0,    0x1ebf,
+  GDK_e, GDK_asciicircum,  GDK_period,       0, 0,    0x1ec7,
+  GDK_e, GDK_asciicircum,  GDK_question,     0, 0,    0x1ec3,
+  GDK_e, GDK_asciicircum,  GDK_grave,        0, 0,    0x1ec1,
+  GDK_e, GDK_asciicircum,  GDK_asciitilde,   0, 0,    0x1ec5,
+  GDK_e,                   GDK_grave,        0, 0, 0, 0xe8,
+  GDK_e,                   GDK_asciitilde,   0, 0, 0, 0x1ebd,
+  GDK_i,                   0,                0, 0, 0, 'i',
+  GDK_i,                   GDK_apostrophe,   0, 0, 0, 0xed,
+  GDK_i,                   GDK_period,       0, 0, 0, 0x1ecb,
+  GDK_i,                   GDK_question,     0, 0, 0, 0x1ec9,
+  GDK_i,                   GDK_grave,        0, 0, 0, 0xec,
+  GDK_i,                   GDK_asciitilde,   0, 0, 0, 0x129,
+  GDK_o,                   0,                0, 0, 0, 'o',
+  GDK_o,                   GDK_apostrophe,   0, 0, 0, 0xF3,
+  GDK_o,  GDK_plus,        0,                0, 0,    0x1a1,
+  GDK_o,  GDK_plus,        GDK_apostrophe,   0, 0,    0x1edb,
+  GDK_o,  GDK_plus,        GDK_period,       0, 0,    0x1ee3,
+  GDK_o,  GDK_plus,        GDK_question,     0, 0,    0x1edf,
+  GDK_o,  GDK_plus,        GDK_grave,        0, 0,    0x1edd,
+  GDK_o,  GDK_plus,        GDK_asciitilde,   0, 0,    0x1ee1,
+  GDK_o,                   GDK_period,       0, 0, 0, 0x1ecd,
+  GDK_o,                   GDK_question,     0, 0, 0, 0x1ecf,
+  GDK_o,  GDK_asciicircum, 0,                0, 0,    0xf4,
+  GDK_o,  GDK_asciicircum, GDK_apostrophe,   0, 0,    0x1ed1,
+  GDK_o,  GDK_asciicircum, GDK_period,       0, 0,    0x1ed9,
+  GDK_o,  GDK_asciicircum, GDK_question,     0, 0,    0x1ed5,
+  GDK_o,  GDK_asciicircum, GDK_grave,        0, 0,    0x1ed3,
+  GDK_o,  GDK_asciicircum, GDK_asciitilde,   0, 0,    0x1ed7,
+  GDK_o,                   GDK_grave,        0, 0, 0, 0xF2,
+  GDK_o,                   GDK_asciitilde,   0, 0, 0, 0xF5,
+  GDK_u,                   0,                0, 0, 0, 'u',
+  GDK_u,                   GDK_apostrophe,   0, 0, 0, 0xFA,
+  GDK_u,  GDK_plus,        0,                0, 0,    0x1b0,
+  GDK_u,  GDK_plus,        GDK_apostrophe,   0, 0,    0x1ee9,
+  GDK_u,  GDK_plus,        GDK_period,       0, 0,    0x1ef1,
+  GDK_u,  GDK_plus,        GDK_question,     0, 0,    0x1eed,
+  GDK_u,  GDK_plus,        GDK_grave,        0, 0,    0x1eeb,
+  GDK_u,  GDK_plus,        GDK_asciitilde,   0, 0,    0x1eef,
+  GDK_u,                   GDK_period,       0, 0, 0, 0x1ee5,
+  GDK_u,                   GDK_question,     0, 0, 0, 0x1ee7,
+  GDK_u,                   GDK_grave,        0, 0, 0, 0xf9,
+  GDK_u,                   GDK_asciitilde,   0, 0, 0, 0x169,
+  GDK_y,                   0,                0, 0, 0, 'y',
+  GDK_y,                   GDK_apostrophe,   0, 0, 0, 0xfd,
+  GDK_y,                   GDK_period,       0, 0, 0, 0x1ef5,
+  GDK_y,                   GDK_question,     0, 0, 0, 0x1ef7,
+  GDK_y,                   GDK_grave,        0, 0, 0, 0x1ef3,
+  GDK_y,                   GDK_asciitilde,   0, 0, 0, 0x1ef9,
+};
+
+static void
+viqr_class_init (GtkIMContextSimpleClass *class)
+{
+}
+
+static void
+viqr_init (GtkIMContextSimple *im_context)
+{
+  gtk_im_context_simple_add_table (im_context,
+                                  viqr_compose_seqs,
+                                  4,
+                                  G_N_ELEMENTS (viqr_compose_seqs) / (4 + 2));
+}
+
+static const GtkIMContextInfo viqr_info = { 
+  "viqr",                 /* ID */
+  N_("Vietnamese (VIQR)"), /* Human readable name */
+  "gtk+",                 /* Translation domain */
+   GTK_LOCALEDIR,         /* Dir for bindtextdomain (not strictly needed for "gtk+") */
+  "vi"                    /* Languages for which this module is the default */
+};
+
+static const GtkIMContextInfo *info_list[] = {
+  &viqr_info
+};
+
+void
+im_module_init (GTypeModule *module)
+{
+  viqr_register_type (module);
+}
+
+void 
+im_module_exit (void)
+{
+}
+
+void 
+im_module_list (const GtkIMContextInfo ***contexts,
+               int                      *n_contexts)
+{
+  *contexts = info_list;
+  *n_contexts = G_N_ELEMENTS (info_list);
+}
+
+GtkIMContext *
+im_module_create (const gchar *context_id)
+{
+  if (strcmp (context_id, "viqr") == 0)
+    return GTK_IM_CONTEXT (gtk_type_new (type_viqr_translit));
+  else
+    return NULL;
+}